#mvc  module view controller
#工厂模式：生产实例
#函数+参数---》实例
class dog:
    pass

class cat:
    pass

def factory(name):
    if name=="dog":
        return dog()
    if name=="cat":
        return cat()

print(factory("dog"))
print(factory("cat"))